#!/bin/sh


#These must be changed according to you local system, to adapt the test script
SR_PATH=/home/paladi/Desktop/ITU/T5/AFST/SupeRemote/superemote/srserver/clisrserver/source
PLG_PATH=/home/paladi/Desktop/ITU/T5/AFST/SupeRemote/superemote/srserver/clisrserver/plugins
TST_PATH=/home/paladi/Desktop/ITU/T5/AFST/SupeRemote/superemote/srserver/tests


cd ..
./autogen.sh
make
#echo "iloveniklas" | sudo make install
$SR_PATH/superemote $PLG_PATH
cd $SR_PATH
echo "sending gcov here"
gcov main.cpp | sendmail niklas@asdasd.net niklas.berglund@gmail.com n.paladi@gmail.com 

echo "sending valgrind here"

valgrind $SR_PATH/superemote $PLG_PATH 2>&1 | sendmail n.paladi@gmail.com niklas.berglund@gmail.com

echo "sending unit tests here"

cd $TST_PATH
./test.sh | sendmail niklas@asdasd.net n.paladi@gmail.com niklas.berglund@gmail.com 

echo "all tests run, over& out!"